package com.mang.school.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mang.school.bean.Address;

@Controller
@RequestMapping("/address")
public class AddressController {
	
private static final Logger logger = LoggerFactory.getLogger(AddressController.class);
	
	@RequestMapping(value = "/{id}", method=RequestMethod.GET)
	public @ResponseBody Address getAddress(@PathVariable String id) {
		logger.info("getAddress...{}", id);
		Address address = new Address();
		address.setId(id);
		address.setStreet1("3 Valluvar South Street");
		return address;
	}

}
